package com.bytz.modules.cms.user.service.impl;

import cn.hutool.core.collection.CollectionUtil;
import com.bytz.modules.cms.user.constants.AuditBatchConstants;
import com.bytz.modules.cms.user.entity.AuditBatch;
import com.bytz.modules.cms.user.mapper.AuditBatchMapper;
import com.bytz.modules.cms.user.service.IAuditBatchService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * <p>
 * 莱宝CMS—审批管理—批量审批批次表 服务实现类
 * </p>
 *
 * @author KyleWang
 * @since 2022-10-10
 */
@Service
public class AuditBatchServiceImpl extends ServiceImpl<AuditBatchMapper, AuditBatch> implements IAuditBatchService {

    @Override
    public Boolean setStatusSynced(String id) {
        return lambdaUpdate()
                .eq(AuditBatch::getId, id)
                .set(AuditBatch::getStatus, AuditBatchConstants.Status.YI_QI_YONG)
                .update();
    }
}
